import React, { Component } from 'react'
import { Link } from 'react-router-dom'
import styles from './index.module.scss'
export default class SearchBar extends Component {
  render() {
    return (
      <div className={styles.search}>
        <div className={styles.search_main}>
          <Link to="/citylist" className={styles.search_city}>
            {/* 父级传递过来的 cityName */}
            <span>{this.props.cityName}</span>
            <i className="iconfont icon-arrow"></i>
          </Link>
          <div className={styles.search_input}>
            <i className="iconfont icon-search"></i>
            <span>请输入小区或地址</span>
          </div>
        </div>
        <div className={styles.search_map}>
          <Link to="/mapFound">
            <i className="iconfont icon-map"></i>
          </Link>
        </div>
      </div>
    )
  }
}
